package zjz.graduation.backend.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import zjz.graduation.backend.mapper.CommentsDao;
import zjz.graduation.backend.model.Comments;

import java.util.List;

@Service
public class CommentsServiceImpl implements CommentsService{
    @Autowired
    CommentsDao commentsDao;

    @Override
    public List<Comments> getCommentsByCid(int cid) {
        return commentsDao.selectCommentsByCid(cid) ;
    }

    @Override
    public void insertComment(Comments comments) {
        commentsDao.insert(comments);
    }
}
